package db.newversion;

public class Combination implements Comparable {
	private String bowCathegory;
	private String ageClass;
	private String gender;

	public Combination(String bowCathegory, String ageClass, String gender) {
		this.bowCathegory = bowCathegory;
		this.ageClass = ageClass;
		this.gender = gender;
	}

	public String getBowCathegory() {
		return this.bowCathegory;
	}

	public void setBowCathegory(String bowCathegory) {
		this.bowCathegory = bowCathegory;
	}

	public String getAgeClass() {
		return this.ageClass;
	}

	public void setAgeClass(String ageClass) {
		this.ageClass = ageClass;
	}

	public String getGender() {
		return this.gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	@Override
	public String toString() {
		return this.bowCathegory + " " + this.ageClass + " " + this.gender;
	}

	@Override
	public boolean equals(Object obj) {
		if (obj instanceof Combination) {
			if (((Combination) obj).getBowCathegory().equals(this.getBowCathegory())) {
				if (((Combination) obj).getAgeClass().equals(this.getAgeClass())) {
					if (((Combination) obj).getGender().equals(this.getGender())) {
						return true;
					}
				}
			}
		}
		return false;
	}

	@Override
	public int hashCode() {
		return this.bowCathegory.hashCode() + this.ageClass.hashCode() + this.gender.hashCode();
	}

	@Override
	public int compareTo(Object arg0) {
		return this.toString().compareTo(arg0.toString());
	}
}
